import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const UserNameKey = 'vue_admin_template_name'
const RoleNameKey = 'vue_admin_template_role_name'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getName() {
  return Cookies.get(UserNameKey)
}

export function setName(name) {
  return Cookies.set(UserNameKey, name)
}

export function removeName() {
  return Cookies.remove(UserNameKey)
}

export function getRoleName() {
  return Cookies.get(RoleNameKey)
}

export function setRoleName(name) {
  return Cookies.set(RoleNameKey, name)
}

export function removeRoleName() {
  return Cookies.remove(RoleNameKey)
}
